<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- -编写一个函数，计算三个数字的大小，按从小到大顺序输出 -->
    <script>
        function min(num1,num2,num3){
			var a = 0;//声明一个变量  方便后面换位置
			if(num1 > num2){
				a = num2;         //将num2的值赋给声明a的变量
				num2 = num1;      //将num1的值赋给num2
				num1 = a;         //再将赋在a(中介)上的num2的值给num1
			}
			if(num2 > num3){
				a = num3;
				num3 = num2;
				num2 = a;
			}
			if(num1 > num2){
				a = num2;
				num2 = num1;
				num1 = a;
			}
			document.write('三个数从小到大是'+num1 + " ",num2 + " ",num3);
        }
        min(10,2,7)
    </script>
</body>
</html>